# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-jaeger-client
pkgver=4.8.0
pkgrel=4
pkgdesc="Jaeger Python OpenTracing Tracer implementation"
url="https://github.com/jaegertracing/jaeger-client-python"
license=('Apache')
arch=('any')
depends=('python-opentracing' 'python-threadloop' 'python-thrift' 'python-tornado')
makedepends=('python-setuptools')
checkdepends=('python-mock' 'python-prometheus_client' 'python-pycurl' 'python-pytest-benchmark' 'python-pytest-localserver')
source=("https://github.com/jaegertracing/jaeger-client-python/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('d47cb19211dd8dbe1d5ce9bc2eb48b8cff0866cb74494d40ec3816b847cb1ed4c657dd21a3cefa0a25af4b708bf09bc9f8c1dbbdbff518bf4121674d93b70372')

build() {
  cd jaeger-client-python-$pkgver
  python setup.py build
}

check() {
  cd jaeger-client-python-$pkgver
  # Tracer test dependencies don't support new Tornado
  pytest --deselect tests/test_prometheus.py --deselect tests/test_tracer.py --deselect tests/test_tracer_benchmark.py
}

package() {
  cd jaeger-client-python-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}
